from po.basePage import base_Page
from selenium.webdriver.common.by import By

class login_page(base_Page):

    username = (By.CSS_SELECTOR,'#username')
    password = (By.CSS_SELECTOR,'#password')
    login_btn = (By.CSS_SELECTOR,'#loginBtn')

    # def __init__(self):
    #     super()

    def login(self,username,password):
        username_ele = self.find_element(self.username)
        username_ele.clear()
        username_ele.send_keys(username)

        password_ele = self.find_element(self.password)
        password_ele.clear()
        password_ele.send_keys(password)

        login_btn_ele = self.find_element(self.login_btn)
        login_btn_ele.click()

    